Build the rulebase from the command line

Build the rulebase from the command line

The Oracle Policy Modeling Command Line Compiler provides a means of building a rulebase from an Oracle Policy Modeling project using the command line. This allows the rulebase build process to be automated by including the command in a script.

The tool operates off an Oracle Policy Modeling project file. The project file settings and the documents included in the project are used to build the rulebase. The tool loads the project file, compiles the documents included in the project and builds the rulebase and other output files. The build process performed is the same as using the Build | Build menu item in Oracle Policy Modeling.

The build tool may also be used to compile and deploy a rulebase to the Determinations Server. The build and deploy process performed is the same as using the Oracle Determinations Server option under the Build | Build and Run... menu item in Oracle Policy Modeling.

By default, the tool performs validation on the rulebase model for rule loops and multiply-proven attributes. If the options detailed below are specified, additional validation can be performed. The build will fail if any validation errors are detected.

Projects created in old versions of Oracle Policy Modeling can be upgraded using the tool. Note that the project files will be copied to a backup location to ensure that you have the original version of the project to refer to if necessary. Release folders are not included in the upgrade process. The treatment of entities and their containment relationships in particular must be brought up to date from older project versions. See Principles for the upgrading of entities and their containment relationships for more information.

Syntax

The Oracle Policy Modeling Command Line Compiler is executed from the command line using the following format:

buildtoolpath projectpath  [build options] [validation options] [report options] [upgrade options] [help options]

Parameters

Parameter Description
buildtoolpath The relative or absolute path of the Oracle.Policy.Modeling.CommandLineCompiler.exe file
projectpath The relative or absolute path of the Oracle Policy Modeling project file to be built
Build Options
-sb Recompiles source documents before building the rulebase
-m Builds the project as a module
-n <build number> Sets the version number of the built rulebase/module
Validation Options
-vd Validates the rulebase model against the data model specified in the Oracle Policy Modeling project
-vds Validates the rulebase for compatibility with Oracle Determinations Server, notably that all relevant attributes have public names
Report Options
-cd Analyzes a *.coverage file and produces a document-oriented report (.xml)
-cg Analyzes a *.coverage file and produces a goal-oriented report( .xml)
Upgrade Options
-upgrade

Checks if the project is compatible with the current version.

If it is compatible, it proceeds to compilation.

If it needs upgrade, the project is upgraded before being compiled.

If it is not compatible (ie the project was created before v9.0), an error is displayed then it exits.

-remReadOnly

Removes write-protection for read-only files. This flag is only valid in the presence of the -upgrade flag.

When set, write-protection will be removed for read-only project files.

When not set, read-only project files will still be copied to the upgraded project directory but won't be processed.

Help Options
-h Prints the help message
--diagnostics Generates diagnostic information. The project path and other parameters are ignored.

Example

For example, a command to build a project called Eligibility, recompile the source documents and then validate the rulebase model against the data model might look like this:

C:\Oracle.Policy.Modeling.CommandLineCompiler.exe C:\Eligibility\Eligibility.xprj -sb -vd